<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/bizappproject/ccd_report_zcc/Ccd_Report_Zcc.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/bizappproject/ccd_report_zcc/Ccd_Report_Zcc.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "Ccd_Report_Zcc",
        setup() {
            const table = ref({
                key: "Id",
                footer: "Foots",
                cnName: "中尺寸结单",
                name: "ccd_report_zcc/Ccd_Report_Zcc",
                newTabEdit: false,
                url: "/Ccd_Report_Zcc/",
                sortName: "Id"
            });
            const editFormFields = ref({"DianduNo":"","Repoter":"","DeviceNo":"","ProductId":"","Spec":"","Grade":"","IncomeQty":"","IncomeWeight":"","OkQty":"","AppearanceNgQty":"","SizeNgQty":"","GongcanQty":"","DoneQty":"","ScrapRecord":"","JudgeResult":"","LossQty":"","Remarks":"","QualifiedRate":"","AppearanceNgRate":"","SizeNgRate":"","GongCanRate":"","LossRate":""});
            const editFormOptions = ref([[{"title":"电镀号","field":"DianduNo","type":"selectTable"},
                               {"title":"结单人","field":"Repoter"},
                               {"title":"设备号","field":"DeviceNo","type":"number"}],
                              [{"title":"产品代码","field":"ProductId","disabled":true},
                               {"title":"产品规格","field":"Spec","disabled":true},
                               {"title":"产品性能","field":"Grade","disabled":true},
                               {"title":"来料总数","field":"IncomeQty","disabled":true,"type":"number"},
                               {"title":"来料重量","field":"IncomeWeight","disabled":true,"type":"decimal"}],
                              [{"title":"合格数量","field":"OkQty","type":"number"},
                               {"title":"外观NG总数","field":"AppearanceNgQty","type":"number"},
                               {"title":"尺寸NG数量","field":"SizeNgQty","type":"number"},
                               {"title":"工残数量","field":"GongcanQty","type":"number"},
                               {"title":"结单数量","field":"DoneQty","disabled":true,"type":"number"}],
                              [{"title":"是否有报废记录","field":"ScrapRecord"},
                               {"title":"判定结果","field":"JudgeResult","disabled":true},
                               {"title":"流失片数","field":"LossQty","disabled":true,"type":"number"}],
                              [{"title":"备注","field":"Remarks","colSize":12,"type":"textarea"}],
                              [{"title":"合格率","field":"QualifiedRate","disabled":true,"type":"decimal"},
                               {"title":"外观NG率","field":"AppearanceNgRate","disabled":true,"type":"decimal"},
                               {"title":"尺寸NG率","field":"SizeNgRate","disabled":true,"type":"decimal"},
                               {"title":"工残率","field":"GongCanRate","disabled":true,"type":"decimal"},
                               {"title":"流失率","field":"LossRate","disabled":true,"type":"decimal"}]]);
            const searchFormFields = ref({"DianduNo":"","Repoter":"","DeviceNo":"","ProductId":"","Spec":"","Grade":"","IncomeQty":[null,null],"IncomeWeight":[null,null],"OkQty":[null,null],"AppearanceNgQty":[null,null],"SizeNgQty":[null,null],"GongcanQty":[null,null],"DoneQty":[null,null],"ScrapRecord":[null,null],"JudgeResult":[null,null],"LossQty":[null,null],"QualifiedRate":[null,null],"AppearanceNgRate":[null,null],"SizeNgRate":[null,null],"GongCanRate":[null,null],"LossRate":""});
            const searchFormOptions = ref([[{"title":"电镀号","field":"DianduNo","type":"like"},{"title":"结单人","field":"Repoter","type":"like"},{"title":"设备号","field":"DeviceNo","type":"like"},{"title":"产品代码","field":"ProductId","type":"like"}],[{"title":"产品规格","field":"Spec","type":"like"},{"title":"产品性能","field":"Grade","type":"like"},{"title":"来料总数","field":"IncomeQty","type":"range"},{"title":"来料重量","field":"IncomeWeight","type":"range"}],[{"title":"合格数量","field":"OkQty","type":"range"},{"title":"外观NG总数","field":"AppearanceNgQty","type":"range"},{"title":"尺寸NG数量","field":"SizeNgQty","type":"range"},{"title":"工残数量","field":"GongcanQty","type":"range"}],[{"title":"结单数量","field":"DoneQty","type":"range"},{"title":"是否有报废记录","field":"ScrapRecord","type":"range"},{"title":"判定结果","field":"JudgeResult","type":"range"},{"title":"流失片数","field":"LossQty","type":"range"}],[{"title":"合格率","field":"QualifiedRate","type":"range"},{"title":"外观NG率","field":"AppearanceNgRate","type":"range"},{"title":"尺寸NG率","field":"SizeNgRate","type":"range"},{"title":"工残率","field":"GongCanRate","type":"range"}],[{"title":"流失率","field":"LossRate","type":"likeEnd"}]]);
            const columns = ref([{field:"Id",title:"键",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"DianduNo",title:"电镀号",type:"string",sort:true,width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Repoter",title:"结单人",type:"string",sort:true,width:150,showOverflowTooltip:true,align:"left"},
                       {field:"DeviceNo",title:"设备号",type:"int",sort:true,width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ProductId",title:"产品代码",type:"string",sort:true,width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"Spec",title:"产品规格",type:"string",sort:true,width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"Grade",title:"产品性能",type:"string",sort:true,width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"IncomeQty",title:"来料总数",type:"int",sort:true,width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"IncomeWeight",title:"来料重量",type:"decimal",sort:true,width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"OkQty",title:"合格数量",type:"int",sort:true,width:110,showOverflowTooltip:true,align:"left"},
                       {field:"AppearanceNgQty",title:"外观NG总数",type:"int",sort:true,width:110,showOverflowTooltip:true,align:"left"},
                       {field:"SizeNgQty",title:"尺寸NG数量",type:"int",sort:true,width:110,showOverflowTooltip:true,align:"left"},
                       {field:"GongcanQty",title:"工残数量",type:"int",sort:true,width:110,showOverflowTooltip:true,align:"left"},
                       {field:"DoneQty",title:"结单数量",type:"int",sort:true,width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"ScrapRecord",title:"是否有报废记录",type:"string",sort:true,width:150,showOverflowTooltip:true,align:"left"},
                       {field:"JudgeResult",title:"判定结果",type:"string",sort:true,width:150,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"LossQty",title:"流失片数",type:"int",sort:true,width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"QualifiedRate",title:"合格率",type:"decimal",sort:true,width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"AppearanceNgRate",title:"外观NG率",type:"decimal",sort:true,width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"SizeNgRate",title:"尺寸NG率",type:"decimal",sort:true,width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"GongCanRate",title:"工残率",type:"decimal",sort:true,width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"LossRate",title:"流失率",type:"decimal",sort:true,width:110,readonly:true,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效(0:否,1:是)",type:"int",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",sort:true,width:110,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建人ID",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人名/结单人",type:"string",width:100,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间/保存日期",type:"datetime",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改人ID",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人名",type:"string",width:100,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,hidden:true,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
